package com.yixing.tech.system.service;

import com.yixing.tech.common.base.*;
import com.yixing.tech.common.vo.s3.UserVO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;

/**
 * @author yixing tech
 * at 2021/12/20
 * describe：
 */
public interface IUserService extends IBaseService<UserVO, UserVO> {


    void modifyPW(UserVO vo) throws BusinessException;
    void resetPW(UserVO vo) throws BusinessException;
    void freezeOrUnFreeze(String userId,boolean isFreeze) throws BusinessException;

    /**
     * 导入用户
     * @param file
     * @throws BusinessException
     */
    void importUsers( MultipartFile file, UserVO loginUser) throws Exception;

    /**
     * 获取用户导入模板
     * @throws BusinessException
     */
    void getImportTemplate(HttpServletResponse response) throws BusinessException;

    public Page<UserVO> listPage(PageRow<ConditionsVO> pageRow);

    /**
     * 更新微信用户的手机号和信息
     */

    UserVO updateWxUser(String phoneStr,String wxName,String avatarUrl,String userId)throws BusinessException;

    /**
     * 绑定微信
     * @param jsCode
     * @param userId
     * @throws BusinessException
     */
    void bindWx(String jsCode,String userId,String tenantId)throws BusinessException;

    /**
     * 解绑微信
     * @param userId
     * @throws BusinessException
     */
    void unBindWx(String userId)throws BusinessException;

    /**
     * 官网注册
     * @param phone
     * @param pw
     * @param verificationCode
     * @throws BusinessException
     */
    void register(String phone,String pw,String verificationCode)throws BusinessException;


}
